//
//  XLAlert.h
//  campus
//
//  Created by xl on 2019/12/15.
//  Copyright © 2019 xl. All rights reserved.
//

#import <Foundation/Foundation.h>


#define XLAlertShow(title) [XLAlert showAlert:title]

@interface XLAlert : NSObject


+ (void)showAlert:(NSString *)title;

+ (void)showAlertTitle:(NSString *)title message:(NSString *)message;

+ (void)showAlertTitle:(NSString *)title okTitle:(NSString *)okTitle;

+ (void)showAlertTitle:(NSString *)title okTitle:(NSString *)okTitle okHandler:(void(^)(UIAlertAction *action))handlerk;

//标题 内容 OK按钮提示字  回调 message对齐方向
+ (void)showAlertTitle:(NSString *)title
               message:(NSString *)message
               okTitle:(NSString *)okTitle
      messageAlignment:(NSTextAlignment)messageAlignment
             okHandler:(void(^)(UIAlertAction *action))handlerk;

//title cancel  OK
+ (void)showAlert:(NSString *)title okHandler:(void(^)(UIAlertAction *action))handlerk;

+ (void)showAlert:(NSString *)title cancelTitle:(NSString *)cancelTitle okTitle:(NSString *)okTitle okHandler:(void(^)(UIAlertAction *action))handlerk;

/** title 一个cancel 按钮 **/
+ (void)showAlert:(NSString *)title cancelTitle:(NSString *)cancelTitle cancelHandler:(void(^)(UIAlertAction *action))handlerk;

+ (void)showAlert:(NSString *)title message:(NSString *)message cancelTitle:(NSString *)cancelTitle okTitle:(NSString *)okTitle okHandler:(void(^)(UIAlertAction *action))handlerk;

//title cancel  OK
+ (void)showAlert:(NSString *)title okHandler:(void(^)(UIAlertAction *action))handlerk cancelHandler:(void(^)(UIAlertAction *action))cancelHander;

+ (void)showAlert:(NSString *)title okTitle:(NSString *)okTitle okHandler:(void(^)(UIAlertAction *action))handlerk cancelHandler:(void(^)(UIAlertAction *action))cancelHander;

+ (void)showTextFieldAlert:(NSString *)title placeholder:(NSString *)placeholder okHandler:(void(^)(UIAlertAction *action))handlerk onfigurationHandler:(void (^)(UITextField *  textField))configurationHandler;

+ (void)showInputTextFieldAlert:(NSString *)title
                        message:(NSString *)message
                      okHandler:(void(^)(NSString *content))content
            onfigurationHandler:(void (^)(UITextField *  textField))configurationHandler;

+ (void)showUpdatingAlert:(NSDictionary *)dic;
@end


